home *** CD-ROM | disk | FTP | other *** search
- From: ajay@lehman.com (Ajay Kamdar)
- Message-ID: <4fdsql$e6m@jabba.lehman.com>
- X-Original-Date: 8 Feb 1996 17:17:57 -0500
- Path: in1.uu.net!bounce-back
- Date: 09 Feb 96 15:35:59 GMT
- Approved: fjh@cs.mu.oz.au
- Newsgroups: comp.std.c++
- Subject: Re: Make type_info name() distinct?
- Organization: Lehman Brothers, Inc.
- References: <v01530500ad36a19a2831@[194.163.74.11]> <199602030146.RAA14333@shellx.best.com> <xsorawcazry.fsf@avs.cs.rpi.edu>
- X-Auth: PGPMoose V1.1 PGP comp.std.c++
- iQBFAgUBMRtqH+EDnX0m9pzZAQGtEQF/QvZvHK4UTt9D2zWAUTR+Nt6d62YNSJWd
- rYwqliOWPEZL3iqNu7qOik4BQPBBlfYe
- =Fu62
-
- In article <xsorawcazry.fsf@avs.cs.rpi.edu>,
- David Vandevoorde <vandevod@cs.rpi.edu> wrote:
- >
- >>>>>> "BG" == Bill Gibbons <bgibbons@best.com> writes:
- >[...]
- >BG> There is some chance that some canonical form will be recommended
- >BG> in a non-normative annex in the standard.
- >
- >There was a thread here some time ago concluding that RTTI would be
- >considerably more convenient for purposes of object persistence and
- >transportation if this could be standardized somehow.
-
- Standardizing the return value of name() helps, but only a little.
- RTTI would be considerably more convenient for the purposes of
- object persistence and transportation if it also included the
- following object layout information:
-
- + Information about data members.
- For each data member, this information would consist of
- # data member typeinfo
- # data member name
- # isAPointer? (number of indirections if yes)
- # isAReference?
- # raw offset from start of immediately containing object
- (This would be of course compiler and platform specific.
- But that is _exactly_ what is required.)
-
- + Information about base classes
- For each base class, this information would consist of
- # base class typeinfo
- # virtual derivation?
- # raw offset from start of deriving class; offset to
- the actual sub-object is a virtual base class
-
- + Virtual destructor?
-
-
- base classes were
- # access protection (public/protected/private)
- # type of derivation (public/protected/private)
-
-
- This list is probably not exhaustive, but would be a good first start.
-
- The compiler generates all this meta data for itself, and unfortunately
- throws it all away rather than allowing access to it
- programmatically. With in the last five years I have worked on three
- separate projects where the availability of meta data from
- the compiler itself would have saved us very significant amounts of
- time and money inventing elaborate meta data generation mechanisms of
- our own.
-
- I don't remember any discussion in this forum as to why the standards
- committee limited RTTI information to its current form. Did the
- committee ever consider standardizing more detailed RTTI?
- Were there technical problems which prevented such standardization?
- --
- Ajay Kamdar | Email: ajay@lehman.com | Standard Disclaimer
- Lehman Brothers | Phone: (201) 524-5048 |
- ---
- [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
- Contact address: std-c++-request@ncar.ucar.edu. Moderation policy:
- http://reality.sgi.com/employees/austern_mti/std-c++/policy.html. ]
-